Skip to main content

Add Reseller Service Group API

POST /addResellerServiceGroup

Description

This API endpoint allows an admin to assign a service group to a reseller by providing the reseller's ID and the service group's ID. This assignment links the reseller to specific services within the service group.

Request Body

The request utilizes GraphQL to perform the addResellerServiceGroup mutation.

Mutation:

mutation addResellerServiceGroup ($resellerId: Int, $serviceGroupId: Int) {
addResellerServiceGroup (resellerId: $resellerId, serviceGroupId: $serviceGroupId) {
id
email
firstName
lastName
credit
level
phone
}
}

Variables:

{
"resellerId": 0,
"serviceGroupId": 0
}
  • resellerId (Int): The unique identifier of the reseller to whom the service group is being assigned.
  • serviceGroupId (Int): The unique identifier of the service group to be assigned to the reseller.

Response:

  • Success (200 OK):

    • If the assignment is successful, the response will return the reseller's details, confirming that the service group has been added to the reseller.
    {
    "data": {
    "addResellerServiceGroup": {
    "id": "<Reseller_ID>",
    "email": "<Reseller_Email>",
    "firstName": "<First_Name>",
    "lastName": "<Last_Name>",
    "credit": "<Credit_Amount>",
    "level": "<Reseller_Level>",
    "phone": "<Phone_Number>"
    }
    }
    }
  • Error (4XX/5XX):

    • Appropriate error messages and status codes will be returned in cases of invalid reseller ID, service group ID, missing required fields, or server errors.

Note:

Ensure that both the resellerId and serviceGroupId correspond to existing entries within the system. This API should be used by admins with the necessary permissions to manage reseller accounts and service group assignments.